package com.spring.boot.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spring.boot.mapper.UserMapper;
import com.spring.boot.pojo.User;
import com.spring.boot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    UserMapper userMapper;

    public Object getUser(){

        int pn = 1;
        int limit = 2;
        Page<User> userPage = new Page<>(pn, limit);
        Page<User> page = page(userPage, null);
        page.getTotal();
        page.getRecords();

        return page;
    }


}
